import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '所属项目',
    align: "center",
    dataIndex: 'projectId_dictText'
  },
  {
    title: '拨款批次',
    align: "center",
    dataIndex: 'fundsId_dictText'
  },
  {
    title: '发放批次',
    align: "center",
    dataIndex: 'grantName'
  },
  {
    title: '说明',
    align: "center",
    dataIndex: 'notes'
  },
  {
    title: '审核状态',
    align: "center",
    dataIndex: 'checkStatus_dictText'
  },
  {
    title: '审核流水',
    align: "center",
    dataIndex: 'procInstId'
  },
  {
    title: '当前状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '所属项目',
    field: 'projectId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "project_funds,project_id,project_id"
    },
  },
  {
    label: '拨款批次',
    field: 'fundsId',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "project_funds_detail,funds_id,funds_id"
    },
  },
  {
    label: '发放批次',
    field: 'grantName',
    component: 'Input',
  },
  {
    label: '说明',
    field: 'notes',
    component: 'Input',
  },
  {
    label: '审核状态',
    field: 'checkStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "check_status"
    },
  },
  {
    label: '审核流水',
    field: 'procInstId',
    component: 'Input',
  },
  {
    label: '当前状态',
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "check_status"
    },
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
